package jhunter.dao.type;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

public class LongTypeHandler extends BaseTypeHandler {

	@Override
	public String getTypeName() {
		return "long";
	}

	@Override
	public int getSqlType() {
		return Types.NUMERIC;
	}

	@Override
	public Class<?> getJavaType() {
		return Long.class;
	}

	@Override
	public String getHibernateTypeName() {
		return "long";
	}

	@Override
	protected Object getNotNullJavaObject(ResultSet rs, String columnName) throws SQLException {
		return rs.getLong(columnName);
	}

}
